package com.tepth.appmanageservice.protocol.bodys.system;

import com.tepth.appmanageservice.protocol.interfaces.ISend;
import com.tepth.appmanageservice.tools.ext.ExtToBytes;

public class ViewHeartbeatFrequencyReply implements ISend {
	public final static short ID = 0x0C04;

	private short reply_serial_number;
	private int value;
	private byte[] data;

	public short getReply_serial_number() {
		return this.reply_serial_number;
	}

	public void setReplySerialNumber(short reply_serial_number) {
		this.reply_serial_number = reply_serial_number;
	}

	public int getValue() {
		return this.value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	@Override
	public short getId() {
		return ID;
	}

	@Override
	public short getLength() {
		return (short) this.data.length;
	}

	@Override
	public byte[] getResult() {
		return this.data;
	}

	@Override
	public void load() {
		byte[][] byteArray = new byte[2][];
		byteArray[0] = ExtToBytes.fromNumber(this.reply_serial_number);
		byteArray[1] = ExtToBytes.fromNumber(this.value);

		this.data = ExtToBytes.fromByteArray2(byteArray);
	}
}